| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | export const OFFSET = 7; |
||
| 4 | export const getEditorTop = (rowElement, moveToTop, editorDom) => { |
||
| 5 | |||
| 6 | if (!rowElement) { |
||
| 7 | return null; |
||
| 8 | } |
||
| 9 | |||
| 10 | if (moveToTop) { |
||
| 11 | return rowElement.offsetTop - (editorDom.clientHeight - TOP_OFFSET); |
||
| 12 | } |
||
| 13 | |||
| 14 | return rowElement.offsetTop + rowElement.clientHeight + OFFSET; |
||
| 15 | }; |
||
| 16 |